//
//  DateConvertTool.h
//  Test
//
//  Created by zhaoshijie on 23/12/2017.
//  Copyright © 2017 zhaoshijie. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum : NSUInteger {
    DateDisplayType_Default = 0,        //  yyyy-MM-dd HH:mm:ss
    DateDisplayType_Date = 1,           //  yyyy-MM-dd
    DateDisplayType_Time = 2,           //  HH:mm
    DateDisplayType_Custom = 3          //  自定义类型
} DateDisplayType;


typedef enum : NSUInteger {
    PreviousDateDirectionType_Before = 0,       //  之前
    PreviousDateDirectionType_After = 1,        //  之后
} PreviousDateDirectionType;

@interface SJDateConvertTool : NSObject




/// 获取现在的时间戳
+ (double)getThePresentTimeStamp;



/// 获取现在的时间
/// @param dateDisplayType 转换类型
/// @param customTypeString 自定义类型，如果不需要的话设置nil
+ (NSString *)getThePresentTimeWithDateDisplayType:(DateDisplayType)dateDisplayType
                                  customTypeString:(NSString *)customTypeString;




/// 时间戳转换成字符串
/// @param timeStamp 时间戳
/// @param dateDisplayType 转换类型
/// @param customTypeString 自定义类型，如果不需要的话设置nil
+ (NSString *)dateConvertTimeStampToStringWithTimeStamp:(double)timeStamp
                                        dateDisplayType:(DateDisplayType)dateDisplayType
                                       customTypeString:(NSString *)customTypeString;




/// 字符串转换成时间戳
/// @param timeString 时间字符串
/// @param dateDisplayType 转换类型
/// @param customTypeString 自定义类型，如果不需要的话设置nil
+ (double)dateConvertStringToTimeStampWithTimeString:(NSString *)timeString
                                   dateDisplayType:(DateDisplayType)dateDisplayType
                                  customTypeString:(NSString *)customTypeString;




/// 字符串转换成字符串  （精确时间转换成模糊时间,，例如：yyyy-MM-dd HH:mm:ss -> HH:mm）
/// @param timeString 时间字符串
/// @param dateDisplayType 转换类型
/// @param customTypeString 自定义类型，如果不需要的话设置nil
+ (NSString *)dateConvertStringToStringWithTimeString:(NSString *)timeString
                                      dateDisplayType:(DateDisplayType)dateDisplayType
                                     customTypeString:(NSString *)customTypeString;



/// 债券列表时间
/// @param timeString 时间
/// @param dateDisplayType 类型
/// @param customTypeString 自定义
+ (NSString *)bondListTimeConversionWithTimeString:(NSString *)timeString
                                   dateDisplayType:(DateDisplayType)dateDisplayType
                                  customTypeString:(NSString *)customTypeString;



/// 社区时间转换
/// @param timeString 时间
/// @param dateDisplayType 转换类型
/// @param customTypeString 自定义类型，如果不需要的话设置nil
+ (NSString *)communityTimeConversionWithTimeString:(NSString *)timeString
                                    dateDisplayType:(DateDisplayType)dateDisplayType
                                   customTypeString:(NSString *)customTypeString;



/// 时间戳转换成字符串
/// @param timeStamp 时间戳
+ (NSString *)dateConvertTimeStampToLatelyStringWithTimeStamp:(double)timeStamp;




/// 获取多少天之前之后的日期时间
/// @param timeString 时间字符串
/// @param dateDisplayType 转换类型
/// @param customTypeString 自定义类型，如果不需要的话设置nil
/// @param dayNum 天数
/// @param directionType 之前之后方向
+ (NSString *)gainPreviousDateWithBeginTimeString:(NSString *)timeString
                                  dateDisplayType:(DateDisplayType)dateDisplayType
                                 customTypeString:(NSString *)customTypeString
                                           dayNum:(NSInteger)dayNum
                                    directionType:(PreviousDateDirectionType)directionType;



/// 获取当前周几
+ (NSString*)getCurrentWeekDay;




@end
